<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<TITLE>
DRA Systems: OR-Objects 1.2.4: Class  BestOfAll
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../drasys/or/graph/tsp/BestOf.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../drasys/or/graph/tsp/CheapestInsertion.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="BestOfAll.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#methods_inherited_from_class_drasys.or.graph.tsp.BestOf">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;METHOD</FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
drasys.or.graph.tsp</FONT>
<BR>
Class  BestOfAll</H2>
<PRE>
java.lang.Object
  |
  +--<A HREF="../../../../drasys/or/graph/tsp/TSPBase.html">drasys.or.graph.tsp.TSPBase</A>
        |
        +--<A HREF="../../../../drasys/or/graph/tsp/BestOf.html">drasys.or.graph.tsp.BestOf</A>
              |
              +--<B>drasys.or.graph.tsp.BestOfAll</B>
</PRE>
<HR>
<DL>
<DT>public class <B>BestOfAll</B><DT>extends <A HREF="../../../../drasys/or/graph/tsp/BestOf.html">BestOf</A><DT>implements <A HREF="../../../../drasys/or/graph/tsp/ConstructI.html">ConstructI</A></DL>

<P>
This class implements a composite TSP algorithm by combining the set of all the OR-Objects TSP construction algorithms with the set of all OR-Objects improvement algorithms.
A composite TSP algorithm is one that has a construction phase followed by an improvement phase.
In the TSP package all basic algorithms are implemented as either
a pure construction or improvement class with the associated interface.
This class implements the construction phase by constructing a set of initial
tours using each of the construction algorithms and retaining the best.
Then in the improvement phase each of the improvement algorithms are applied in turn to improve the retained tour.
If the new tour is an improvement then it becomes the retained tour.<BR>
<BR>
&nbsp;
<CENTER><TABLE BORDER >
<CAPTION><B>Construction Algorithms</B></CAPTION>

<TR>
<TD ROWSPAN="2">Algorithm</TD>

<TD COLSPAN="2">
<CENTER>Dimension</CENTER>
</TD>
</TR>

<TR>
<TD>Min</TD>

<TD>Max</TD>
</TR>

<TR>
<TD>Full Enumeration</TD>

<TD>
<CENTER>2</CENTER>
</TD>

<TD>
<CENTER>8</CENTER>
</TD>
</TR>

<TR>
<TD>NearestAddition()</TD>

<TD>
<CENTER>9</CENTER>
</TD>

<TD>
<CENTER>-</CENTER>
</TD>
</TR>

<TR>
<TD>NearestInsertion()</TD>

<TD>
<CENTER>9</CENTER>
</TD>

<TD>
<CENTER>-</CENTER>
</TD>
</TR>

<TR>
<TD>FarthestInsertion()</TD>

<TD>
<CENTER>9</CENTER>
</TD>

<TD>
<CENTER>-</CENTER>
</TD>
</TR>

<TR>
<TD>CheapestInsertion()</TD>

<TD>
<CENTER>9</CENTER>
</TD>

<TD>
<CENTER>200</CENTER>
</TD>
</TR>

<TR>
<TD>Geni(9)</TD>

<TD>
<CENTER>9</CENTER>
</TD>

<TD>
<CENTER>50</CENTER>
</TD>
</TR>

<TR>
<TD>Geni(7)</TD>

<TD>
<CENTER>51</CENTER>
</TD>

<TD>
<CENTER>500</CENTER>
</TD>
</TR>

<TR>
<TD>Geni(5)</TD>

<TD>
<CENTER>501</CENTER>
</TD>

<TD>
<CENTER>-</CENTER>
</TD>
</TR>
</TABLE></CENTER>
&nbsp;
<CENTER><TABLE BORDER >
<CAPTION><B>Improvement Algorithms</B></CAPTION>

<TR>
<TD ROWSPAN="2">Algorithm&nbsp;</TD>

<TD COLSPAN="2">
<CENTER>Dimension</CENTER>
</TD>
</TR>

<TR>
<TD>Min</TD>

<TD>Max</TD>
</TR>

<TR>
<TD>ThreeOpt()</TD>

<TD>
<CENTER>9</CENTER>
</TD>

<TD>
<CENTER>300</CENTER>
</TD>
</TR>

<TR>
<TD>TwoOpt()</TD>

<TD>301</TD>

<TD>
<CENTER>-</CENTER>
</TD>
</TR>

<TR>
<TD>Us(7)</TD>

<TD>
<CENTER>9</CENTER>
</TD>

<TD>
<CENTER>50</CENTER>
</TD>
</TR>

<TR>
<TD>Us(4)</TD>

<TD>
<CENTER>51</CENTER>
</TD>

<TD>
<CENTER>-</CENTER>
</TD>
</TR>
</TABLE></CENTER>
&nbsp;
<BR>
<P>
<DL>
<DT><B>See Also: </B><DD><A HREF="../../../../drasys/or/graph/tsp/Geni.html"><CODE>Geni</CODE></A>, 
<A HREF="../../../../drasys/or/graph/tsp/NearestInsertion.html"><CODE>NearestInsertion</CODE></A>, 
<A HREF="../../../../drasys/or/graph/tsp/FarthestInsertion.html"><CODE>FarthestInsertion</CODE></A>, 
<A HREF="../../../../drasys/or/graph/tsp/CheapestInsertion.html"><CODE>CheapestInsertion</CODE></A>, 
<A HREF="../../../../drasys/or/graph/tsp/Us.html"><CODE>Us</CODE></A>, 
<A HREF="../../../../drasys/or/graph/tsp/TwoOpt.html"><CODE>TwoOpt</CODE></A>, 
<A HREF="../../../../drasys/or/graph/tsp/ThreeOpt.html"><CODE>ThreeOpt</CODE></A></DL>
<HR>

<P>
<!-- ======== INNER CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->


<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../drasys/or/graph/tsp/BestOfAll.html#BestOfAll()">BestOfAll</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../drasys/or/graph/tsp/BestOfAll.html#BestOfAll(drasys.or.graph.GraphI)">BestOfAll</A></B>(<A HREF="../../../../drasys/or/graph/GraphI.html">GraphI</A>&nbsp;graph)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="methods_inherited_from_class_drasys.or.graph.tsp.BestOf"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class drasys.or.graph.tsp.<A HREF="../../../../drasys/or/graph/tsp/BestOf.html">BestOf</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../drasys/or/graph/tsp/BestOf.html#addConstruct(drasys.or.graph.tsp.ConstructI)">addConstruct</A>, 
<A HREF="../../../../drasys/or/graph/tsp/BestOf.html#addConstruct(drasys.or.graph.tsp.ConstructI, int, int)">addConstruct</A>, 
<A HREF="../../../../drasys/or/graph/tsp/BestOf.html#addImprove(drasys.or.graph.tsp.ImproveI)">addImprove</A>, 
<A HREF="../../../../drasys/or/graph/tsp/BestOf.html#addImprove(drasys.or.graph.tsp.ImproveI, int, int)">addImprove</A>, 
<A HREF="../../../../drasys/or/graph/tsp/BestOf.html#constructClosedTour()">constructClosedTour</A>, 
<A HREF="../../../../drasys/or/graph/tsp/BestOf.html#constructOpenTour()">constructOpenTour</A>, 
<A HREF="../../../../drasys/or/graph/tsp/BestOf.html#constructOpenTour(java.lang.Object, java.lang.Object)">constructOpenTour</A>, 
<A HREF="../../../../drasys/or/graph/tsp/BestOf.html#constructOpenTourFrom(java.lang.Object)">constructOpenTourFrom</A>, 
<A HREF="../../../../drasys/or/graph/tsp/BestOf.html#constructOpenTourTo(java.lang.Object)">constructOpenTourTo</A>, 
<A HREF="../../../../drasys/or/graph/tsp/BestOf.html#getCost()">getCost</A>, 
<A HREF="../../../../drasys/or/graph/tsp/BestOf.html#getTour()">getTour</A>, 
<A HREF="../../../../drasys/or/graph/tsp/BestOf.html#selectVertex(boolean)">selectVertex</A>, 
<A HREF="../../../../drasys/or/graph/tsp/BestOf.html#selectVertex(boolean[])">selectVertex</A>, 
<A HREF="../../../../drasys/or/graph/tsp/BestOf.html#selectVertex(java.lang.Object, boolean)">selectVertex</A>, 
<A HREF="../../../../drasys/or/graph/tsp/BestOf.html#setEdgeKey(java.lang.Object)">setEdgeKey</A>, 
<A HREF="../../../../drasys/or/graph/tsp/BestOf.html#setGraph(drasys.or.graph.GraphI)">setGraph</A>, 
<A HREF="../../../../drasys/or/graph/tsp/BestOf.html#setProperties(drasys.or.graph.PropertiesI)">setProperties</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_drasys.or.graph.tsp.TSPBase"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class drasys.or.graph.tsp.<A HREF="../../../../drasys/or/graph/tsp/TSPBase.html">TSPBase</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../drasys/or/graph/tsp/TSPBase.html#checkChangeCount()">checkChangeCount</A>, 
<A HREF="../../../../drasys/or/graph/tsp/TSPBase.html#countVertices()">countVertices</A>, 
<A HREF="../../../../drasys/or/graph/tsp/TSPBase.html#forwardCost(int, int)">forwardCost</A>, 
<A HREF="../../../../drasys/or/graph/tsp/TSPBase.html#initVertices(int, int)">initVertices</A>, 
<A HREF="../../../../drasys/or/graph/tsp/TSPBase.html#initVertices(java.util.Vector)">initVertices</A>, 
<A HREF="../../../../drasys/or/graph/tsp/TSPBase.html#reverseCost(int, int)">reverseCost</A>, 
<A HREF="../../../../drasys/or/graph/tsp/TSPBase.html#rotateClosedTour(java.util.Vector, java.lang.Object)">rotateClosedTour</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, 
equals, 
finalize, 
getClass, 
hashCode, 
notify, 
notifyAll, 
toString, 
wait, 
wait, 
wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->


<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="BestOfAll()"><!-- --></A><H3>
BestOfAll</H3>
<PRE>
public <B>BestOfAll</B>()</PRE>
<DL>
</DL>
<HR>

<A NAME="BestOfAll(drasys.or.graph.GraphI)"><!-- --></A><H3>
BestOfAll</H3>
<PRE>
public <B>BestOfAll</B>(<A HREF="../../../../drasys/or/graph/GraphI.html">GraphI</A>&nbsp;graph)</PRE>
<DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../drasys/or/graph/tsp/BestOf.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../drasys/or/graph/tsp/CheapestInsertion.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="BestOfAll.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#methods_inherited_from_class_drasys.or.graph.tsp.BestOf">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;METHOD</FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
Copyright(C)1997-2000 by DRA Systems all rights reserved. <A HREF=http://OpsResearch.com TARGET=HOME>OpsResearch.com</A>
</BODY>
</HTML>
